/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import dataAccess.TimeTableJpaController;
import entities.TimeTable;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author QUY-THI
 */
public class EditTimeTable {

    public boolean editTimeTable(TimeTable tt) {
        try {
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("E-AdministrationPU");
            TimeTableJpaController tc = new TimeTableJpaController(emf);
            tc.edit(tt);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
